package com.stox.charting.ui.swing.presenter.delegate.composer;

import java.awt.BorderLayout;

import com.stox.charting.ui.swing.view.ChartingInternalFrameView;

public class ChartingInternalFrameViewComposer {

	private ChartViewComposer chartViewComposer;
	private ChartingControlPanelComposer chartingControlPanelComposer;
	
	public void compose(ChartingInternalFrameView view){
		if(view != null){
			if(view.getPriceChartView() != null){
				if(view.getPriceChartView() != null){
					view.getContentPane().add(view.getPriceChartView(),BorderLayout.CENTER);
					if(view.getVolumeChart() != null){
						view.getPriceChartView().addChart(view.getVolumeChart());
					}
					chartViewComposer.compose(view.getPriceChartView());
				}
			}
		}
	}
	
	
	public ChartViewComposer getChartViewComposer() {
		return chartViewComposer;
	}

	public void setChartViewComposer(ChartViewComposer chartViewComposer) {
		this.chartViewComposer = chartViewComposer;
	}

	public ChartingControlPanelComposer getChartingControlPanelComposer() {
		return chartingControlPanelComposer;
	}

	public void setChartingControlPanelComposer(
			ChartingControlPanelComposer chartingControlPanelComposer) {
		this.chartingControlPanelComposer = chartingControlPanelComposer;
	}
	
}
